package com.sun.spring5.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

//@Component
@Data
@AllArgsConstructor
public class Person {
    private String name;
    private int age;

    public Person() {
        System.out.println("person将被创建");
    }

    public void init(){
        System.out.println("person初始化方法");
    }

    public void destroy(){
        System.out.println("person销毁方法");
    }


}
